class G2ContenderDTBullet extends KFMod.M99Bullet;

CONST AFFLICTION_DUR=5.00;

simulated function ProcessTouch (Actor Other, vector HitLocation)
{
	local vector X;

	X =  Vector(Rotation);

	Super.ProcessTouch(Other,HitLocation);

	if ( Pawn(Other) != none )
	{
		AfflictVictim(Pawn(Other),Pawn(Other).IsHeadShot(HitLocation, X, 1.0));
		Destroyed();
		Destroy();
	}
}

function bool AfflictVictim(Pawn Victim, bool bIsHeadshot)
{
	local DKMonster Mon;
	local float Dur;
	local TranquilizatorSlowingProj SlowProj;
	local TranquilizatorDisableProj DisProj;
	
	if ( SRPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.default.PerkIndex != class'SRVetSaboteur'.default.PerkIndex )
	{
		return false;
	}
	
	Mon = DKMonster(Victim);
	
	if ( Mon == none )
	{
		return false;
	}
	
	Dur = AFFLICTION_DUR;
	
	if ( bIsHeadshot )
	{
		Dur *= 1.50;
	}
	
	KFMonster(Victim).PlayDirectionalHit(Victim.Location);
	SlowProj = Spawn(class'TranquilizatorSlowingProj',Self,,Victim.Location);
	SlowProj.Stick(Victim,Victim.Location);
	DisProj = Spawn(class'TranquilizatorDisableProj',Self,,Victim.Location);
	DisProj.Stick(Victim,Victim.Location);
	
	return true;
}

defaultproperties
{
     DamageTypeHeadShot=Class'DamTypeG2ContenderDT'
     HeadShotDamageMult=1.00
     Speed=28000.0
     MaxSpeed=200000.0
     Damage=300.0
     MomentumTransfer=150000.0
     MyDamageType=Class'DamTypeG2ContenderDT'
}
